const demoLayout = [
  {
    path: '/DemoLayout',
    name: 'DemoLayout',
    component: 'Layout',
    redirect: 'noredirect',
    meta: { title: '示例：布局', icon: 'im im-briefcase' },
    children: [
      {
        path: 'Edit',
        name: 'DemoLayoutEdit', // 如果缓存必须与对应的组件 name 一致
        component: 'DemoLayout/Edit',
        meta: { title: '编辑页', refresh: true }
      },
      {
        path: 'LeftRight',
        name: 'DemoLayoutLeftRight',
        component: 'DemoLayout/LeftRight',
        meta: { title: '左右页', noCache: true }
      },
      {
        path: 'Datatable',
        name: 'DemoLayoutDatatable',
        component: 'DemoLayout/DataTable/Page8',
        meta: { title: '数据表格页' }
      },
      // {
      //   path: 'DataTable',
      //   name: 'DemoLayoutDataTable',
      //   redirect: 'DemoLayout/DataTable/Page5',
      //   component: 'Shim',
      //   meta: { title: '数据表格' },
      //   children: [
      //     {
      //       path: 'Page5',
      //       name: 'DemoLayoutDataTablePage5',
      //       component: 'DemoLayout/DataTable/Page5',
      //       meta: { title: '数据表格表现一' }
      //     },
      //     {
      //       path: 'Page6',
      //       name: 'DemoLayoutDataTablePage6',
      //       component: 'DemoLayout/DataTable/Page6',
      //       meta: { title: '数据表格表现二' }
      //     },
      //     {
      //       path: 'Page8',
      //       name: 'DemoLayoutDataTablePage8',
      //       component: 'DemoLayout/DataTable/Page8',
      //       meta: { title: '数据表格表现三', refresh: true }
      //     }
      //   ]
      // },
      {
        path: 'Readonly',
        name: 'DemoLayoutReadonly',
        component: 'DemoLayout/Readonly',
        meta: { title: '只读指令', noCache: true }
      },
      {
        path: 'SameTemplate',
        name: 'DemoLayoutSameTemplate',
        component: 'DemoLayout/SameTemplate',
        meta: { title: '相同模板不同展示', info: 'first', tagsGroup: 'Display', tagsTitle: '编辑展示' }
      },
      {
        path: 'SameTemplate2',
        name: 'DemoLayoutSameTemplate2',
        component: 'DemoLayout/SameTemplate',
        meta: { title: '相同模板不同展示2', info: 'second', tagsGroup: 'Display', tagsTitle: '编辑展示', noCache: true }
      },
      {
        path: 'Tabs',
        name: 'DemoLayoutTabs',
        component: 'DemoLayout/Tabs',
        meta: { title: '多页签展示' }
      },
      {
        path: 'Toolbar',
        name: 'DemoLayoutToolbar',
        component: 'DemoLayout/Toolbar',
        meta: { title: '工具栏展示', noCache: true }
      },
      {
        path: 'Baidu',
        name: 'LayoutBaidu',
        component: 'Frame',
        meta: { title: '内嵌外部链接', frame: 'https://baidu.com' }
      },
      {
        path: 'https://baidu.com',
        name: 'LayoutBaiduExtra',
        component: 'Frame',
        meta: { title: '外嵌外部链接' }
      }
    ]
  }
]

const demoComponent = [
  {
    path: '/DemoComponent',
    name: 'DemoComponent',
    component: 'Layout',
    redirect: 'noredirect',
    meta: { title: '示例：项目组件', icon: 'im im-plugin' },
    children: [
      {
        path: 'Treepicker',
        name: 'DemoComponentTreepicker',
        component: 'DemoComponent/Treepicker',
        meta: { title: 'GwTreepicker' }
      },
      {
        path: 'Content',
        name: 'DemoComponentContent',
        component: 'DemoComponent/Content',
        meta: { title: 'GwContent', noCache: true }
      },
      {
        path: 'Title',
        name: 'DemoComponentTitle',
        component: 'DemoComponent/Title',
        meta: { title: 'GwTitle', noCache: true }
      },
      {
        path: 'Panel',
        name: 'DemoComponentPanel',
        component: 'DemoComponent/Panel',
        meta: { title: 'GwPanel', noCache: true }
      },
      {
        path: 'Footer',
        name: 'DemoComponentFooter',
        component: 'DemoComponent/Footer',
        meta: { title: 'GwFooter', noCache: true }
      },
      {
        path: 'More',
        name: 'DemoComponentMore',
        component: 'DemoComponent/More',
        meta: { title: 'GwMore', noCache: true }
      },
      {
        path: 'Icon',
        name: 'DemoComponentIcon',
        component: 'DemoComponent/Icon',
        meta: { title: 'GwIcon', noCache: true }
      },
      {
        path: 'Toolbar',
        name: 'DemoComponentToolbar',
        component: 'DemoComponent/Toolbar',
        meta: { title: 'GwToolbar', noCache: true }
      }
    ]
  }
]

const demoUi = [
  {
    path: '/DemoUi',
    name: 'DemoUi',
    component: 'Layout',
    redirect: 'noredirect',
    meta: { title: '示例：Ui 组件', icon: 'im im-plugin'},
    children: [
      {
        path: 'Section',
        name: 'DemoUiSection',
        component: 'DemoUi/Section',
        meta: { title: 'UiSection' }
      },
      {
        path: 'Icon',
        name: 'DemoUiIcon',
        component: 'DemoUi/Icon',
        meta: { title: 'UiIcon' }
      },
      {
        path: 'Affix',
        name: 'DemoUiAffix',
        component: 'DemoUi/Affix',
        meta: { title: 'UiAffix' }
      }
    ]
  }
]

export const routes = [
  ...demoLayout,
  ...demoComponent,
  ...demoUi
]

export default [
  {
    url: '/routes',
    type: 'get',
    response: {
      message: '请求成功',
      success: true,
      data: routes
    }
  }
]
